package com.baidu.shop.entity;

import com.baidu.shop.validate.group.MingruiOperation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

/**
 * @Description:
 * @ClassName: BrandEntity
 * @Author: User
 * @date: 2020.08.31 14:35
 * @version: 1.0
 */
@Data
@ApiModel(value = "品牌实体类")
@Table(name="tb_brand")
public class BrandEntity {
    @Id
    @ApiModelProperty(value = "品牌id",example = "1")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @NotNull(message = "id不能为空",groups = {MingruiOperation.Update.class})
    private  Integer  id;

    @ApiModelProperty(value = "品牌name")
    @NotNull(message = "品牌名称不能为空",groups = {MingruiOperation.Update.class,MingruiOperation.Add.class})
    private String name;

    @ApiModelProperty(value = "品牌图片")
    private String image;
    @ApiModelProperty(value = "品牌首字母")
    private Character letter;
}
